package test;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class WeekDay {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入1-7\n输入0退出");
        int num = 0;
        while (true) {
            num = in.nextInt();
            if (num == 0) return;

            if (num > 7 || num < 1) {
                System.out.println("请重新输入：");
                continue;
            }

            switch (num) {
                case 1:
                    System.out.println("星期一");
                    break;
                case 2:
                    System.out.println("星期二");
                    break;
                case 3:
                    System.out.println("星期三");
                    break;
                case 4:
                    System.out.println("星期四");
                    break;
                case 5:
                    System.out.println("星期五");
                    break;
                case 6:
                    System.out.println("星期六");
                    break;
                case 7:
                    System.out.println("星期天");
                    break;
            }
        }

    }
}
